<!DOCTYPE html>
<html xlmns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorator="layout/default">
<head>
<meta charset="UTF-8"/>
<title>Upload</title>
</head>
<body>
	<div class="row" layout:fragment="content">
		<h2 class="indigo-text center">Upload</h2>
		<div class="red-text col s12 center" th:text="${error}" th:if="${error}">Error during upload</div>
		<div class="col m8 s12 offset-m2">
			<img th:src="@{/uploadedPicture}" width="100" height="100"/>
		</div>
		<form th:action="@{/upload}" enctype="multipart/form-data" method="Post" class="col m8 s12 offset-m2">
			<div class="input-field col s6">
				<input type="file" id="file" name="file"/>
			</div>
			<div class="center col s6">
				<button class="btn indigo waves-effect waves-light" type="submit" name="save" th:text="#{submit}"></button>
			</div>		
		</form>
	</div>
</body>
</html>